<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
	<form method="post" action="?" id="dform">
    <input type="hidden" name="moduleid" value="<?php echo $moduleid;?>"/>
    <input type="hidden" name="file" value="<?php echo $file;?>"/>
    <input type="hidden" name="action" value="<?php echo $action;?>"/>
    <input type="hidden" name="itemid" value="<?php echo $itemid;?>"/>
    <input type="hidden" name="forward" value="<?php echo $forward;?>"/>
    <input type="hidden" name="post[typeid]" value="<?php echo $typeid;?>"/>

    <div class="tt"><?php echo $action == 'add' ? '添加' : '修改';?>单页</div>
    <table cellpadding="2" cellspacing="1" class="tb">
        <tr>
            <td class="tl"><span class="f_red">*</span> 会员名</td>
            <td><input name="post[username]" type="text" id="username" size="20" value="<?php echo $username;?>"/> <a href="javascript:_user(Dd('username').value);" class="t">[资料]</a> <span id="dusername" class="f_red"></span></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_red">*</span> 单页标题</td>
            <td><input name="post[title]" type="text" id="title" size="40" datatype="*2-999" nullmsg="请填写标题" errormsg="最少输入2个字符" value="<?php echo $title;?>"/> <?php echo dstyle('post[style]', $style);?> <span id="dtitle" class="f_red"></span></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_red">*</span> 单页内容</td>
	        <td><?php echo Post::kindEditor('post[content]', $moduleid, $content, 'datatype="*5-99999" nullmsg="请填写内容" errormsg="内容最少5字"','800px'); ?></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_hid">*</span> 单页状态</td>
            <td>
                <input type="radio" name="post[status]" value="3" <?php if ($status == 3) echo 'checked';?> id="status_3"/><label for="status_3"> 通过</label>
                <input type="radio" name="post[status]" value="2" <?php if ($status == 2) echo 'checked';?> id="status_2"/><label for="status_2"> 待审</label>
                <input type="radio" name="post[status]" value="1" <?php if ($status == 1) echo 'checked';?> onclick="if(this.checked) Dd('note').style.display='';" id="status_1"/><label for="status_1"> 拒绝</label>
                <input type="radio" name="post[status]" value="0" <?php if ($status == 0) echo 'checked';?> id="status_0"/><label for="status_0"> 删除</label>
            </td>
        </tr>
        <tr id="note" style="display:<?php echo $status == 1 ? '' : 'none';?>">
            <td class="tl"><span class="f_red">*</span> 拒绝理由</td>
            <td><input name="post[note]" type="text" size="40" value="<?php echo $note;?>"/></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_hid">*</span> 排序</td>
            <td><input type="text" size="5" name="post[listorder]" value="<?php echo $listorder;?>"/> 请填写数字，数字越大越靠前</td>
        </tr>
    </table>
    <div class="sbt"><input type="submit" name="submit" value=" 确 定 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="reset" value=" 重 置 " class="btn"/></div>
</form>
<script type="text/javascript">
	seajs.use(['$', 'vf', 'vf-css', 'easyui','easyui-css'], function($){
		$('#dform').Validform({
			beforeCheck:function(curform){
				lemon.editor.post_content_.sync();
			}
		});
	})
</script>
<script type="text/javascript">Menuon(<?php echo $menuid;?>);</script>
<?php include tpl('footer'); ?>